package com.music.music.web;

import com.music.common.core.utils.SnowflakeIdWorker;
import com.music.common.core.utils.poi.ExcelUtil;
import com.music.common.core.web.controller.BaseController;
import com.music.common.core.web.domain.AjaxResult;
import com.music.common.core.web.page.TableDataInfo;
import com.music.common.log.annotation.Log;
import com.music.common.log.enums.BusinessType;
import com.music.common.security.annotation.RequiresPermissions;
import com.music.music.domain.Music;
import com.music.music.domain.MusicSinger;
import com.music.music.service.MusicService;
import com.music.music.service.MusicSingerService;
import com.music.music.vo.MusicVo;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 音乐列表Controller
 *
 * @author ruoyi
 * @date 2024-10-22
 */
@RestController
@RequestMapping("/music/web")
public class MusicControllerWeb extends BaseController {
    @Resource
    private MusicService musicService;
    @Resource
    private MusicSingerService musicSingerService;

    /**
     * 查询音乐列表列表
     */
    @GetMapping("/list")
    public TableDataInfo list(Music music) {
        System.out.println(music);
        startPage();
        List<MusicVo> list = musicService.selectMusicList2(music);
        return getDataTable(list);
    }


}
